package com.hockeo.shared.rpc.classic;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.hockeo.client.model.JSData;
import com.hockeo.client.model.LoginStatus;
import com.hockeo.server.rpc.AuthenticationType;
import com.hockeo.server.rpc.classic.RpcMethodOptions;
import com.hockeo.shared.rpc.classic.error.RpcServerException;

/**
 * Classic RPC service interface.
 *
 * @version $Id$
 * @author jjanke
 */
@RemoteServiceRelativePath( "classic.rpc" )
public interface IRpcClassicService extends RemoteService
{
  /**
   * General purpose data commit method.
   *
   * @param list the data to be committed
   */
  @RpcMethodOptions( authType = AuthenticationType.SIMPLE )
  public RpcVoidResult commitData( List<JSData> list );

  /**
   * Determines whether the user is logged in or not and returns a {@link LoginStatus}
   * object.
   *
   * @return an object indicating the login status of the current user
   */
  public LoginStatus getLoginStatus() throws RpcServerException;

  public List<JSData> getAllAssociations();
}
